﻿using System;

namespace Entities
{
    [Serializable]
    public class Account
    {
        private int accountID;
        private string accountNumber;
        private int accountTypeID;
        private string clientNumber;
        private string balance;
        private string owner;
        private string address;
        private string cMTORHC;
        private string moneyType;
        private DateTime openDatetime;
        private DateTime lastTransaction;
        public Account()
        { }
        public Account(int accountID, string accountNumber, int accountTypeID, string clientNumber, string balance, string owner, string address, string cMTORHC, string moneyType, DateTime openDatetime, DateTime lastTransaction)
        {
            this.accountID = accountID;
            this.accountNumber = accountNumber;
            this.accountTypeID = accountTypeID;
            this.clientNumber = clientNumber;
            this.balance = balance;
            this.owner = owner;
            this.address = address;
            this.cMTORHC = cMTORHC;
            this.moneyType = moneyType;
            this.openDatetime = openDatetime;
            this.lastTransaction = lastTransaction;
        }
        public int AccountID
        {
            get { return this.accountID; }
            set
            {
                if (value == 0)
                    throw new Exception("accountID not allow nullvalue.");
                this.accountID = value;
            }
        }
        public string AccountNumber
        {
            get { return this.accountNumber; }
            set
            {
                if (value == null)
                    throw new Exception("accountNumber not allow nullvalue.");
                this.accountNumber = value;
            }
        }
        public int AccountTypeID
        {
            get { return this.accountTypeID; }
            set { this.accountTypeID = value; }
        }
        public string ClientNumber
        {
            get { return this.clientNumber; }
            set { this.clientNumber = value; }
        }
        public string Balance
        {
            get { return this.balance; }
            set { this.balance = value; }
        }
        public string Owner
        {
            get { return this.owner; }
            set { this.owner = value; }
        }
        public string Address
        {
            get { return this.address; }
            set { this.address = value; }
        }
        public string CMTORHC
        {
            get { return this.cMTORHC; }
            set { this.cMTORHC = value; }
        }
        public string MoneyType
        {
            get { return this.moneyType; }
            set { this.moneyType = value; }
        }
        public DateTime OpenDatetime
        {
            get { return this.openDatetime; }
            set { this.openDatetime = value; }
        }
        public DateTime LastTransaction
        {
            get { return this.lastTransaction; }
            set { this.lastTransaction = value; }
        }

    }
}